const express = require('express');
const router = express.Router();
const { getHeors, getHeorsByID, upDataHeors, addHeors, deleteHeors } = require('../service/heorsService');

class HeorsController {
  static initRouter() {
    router.get('/', getHeors);
    router.get('/:id', getHeorsByID);
    router.post('/add', addHeors);
    router.put('/:id', upDataHeors);
    router.delete('/:id', deleteHeors);
    return router;
  }
}

module.exports = HeorsController.initRouter();